<template>
  <view class="back-button-container" @click="goBack">
    <uni-icons type="back" size="24" color="#333333" class="back-icon"></uni-icons>
  </view>
</template>

<script>
export default {
  methods: {
    goBack() {
      // 使用uni-app的返回API
      uni.navigateBack({
        delta: 1 // 返回的页面数
      });
    }
  }
}
</script>

<style scoped>
.back-button-container {
  position: fixed;
  top: 50px;
  left: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.9);
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  padding: 0;
  margin: 0;
  backdrop-filter: blur(10px);
}

.back-icon {
  font-weight: bold;
}

.back-button-container:active {
  background-color: rgba(245, 245, 245, 0.9);
  transform: scale(0.95);
}
</style>